package com.ctg.itrdc.sysmgr.portal.api.service;

import java.util.List;

import com.ctg.itrdc.pasp.core.IBaseService;
import com.ctg.itrdc.pasp.core.PageInfo;
import com.ctg.itrdc.sysmgr.portal.api.dto.SystemUserDTO;
import com.ctg.itrdc.sysmgr.portal.data.entity.SystemUser;

public interface ISystemUserService extends IBaseService<SystemUser, Long, SystemUserDTO>{
	
	public SystemUserDTO findUserByLoginName(String sysUserCode);
	
	public String resetPassword(SystemUserDTO dto);

	public void updateLoginNum(Long sysUserId);

	public PageInfo<SystemUserDTO> excludeByIds(SystemUserDTO dto, List<Long> idList,
			int currentPage, int perPageNum);

	public PageInfo<SystemUserDTO> includeByIds(SystemUserDTO dto, List<Long> idList,
			int currentPage, int perPageNum);

	public PageInfo selectByOrgId(SystemUserDTO dto, int currentPage,
			int perPageNum);

	/**
	 * @param dto 需要传入sysUserCode以及password
	 * @return 1: 正确；0：用户名不存在；-1：密码错误
	 */
	public int validatedUser(SystemUserDTO dto);

	int updatePassword(String id, String password, String oldPassword);

	int updateWithPassword(SystemUserDTO dto, String password);
}
